<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>收入报表图</title>
    <script src="/js/plugins/echarts/echarts.common.min.js"></script>
</head>
<div id="main" style="width: 1000px;height: 800px"></div>
<script>
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        legend: {},
        tooltip: {},
        dataset: {
            source: [
                ['分组类型', '总消费金额', '总优惠金额', '总实收金额'],
                <#list  items as it>
                ['${it.groupByName}', ${it.totalAmount}, ${it.totalDiscountAmount}, ${it.totalPayAmount}],
                </#list>
            ]
        },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}
        ]
    };
    option && myChart.setOption(option);
</script>
</html>